#ifndef COMPILE_ONLINE
#include"head.cpp"
#endif

void Test1()
{
    vector<int> nums = {2, 7, 11, 15};
    vector<int> tmp = Solution().twoSum(nums, 9);

    int sum = 0;
    for(auto e: tmp)    sum += nums[e];

    if(sum == 9)
    {
        std::cout << "通过用例1...OK!" << std::endl;
    }
    else
    {
        std::cout << "没有通过用例1..." << std::endl;
    }
}

void Test2()
{
    vector<int> nums = {3, 2, 4};
    vector<int> tmp = Solution().twoSum(nums, 6);

    int sum = 0;
    for(auto e: tmp)    sum += nums[e];

    if(sum == 6)
    {
        std::cout << "通过用例2...OK!" << std::endl;
    }
    else
    {
        std::cout << "没有通过用例2..." << std::endl;
    }
}


int main()
{
    Test1();
    Test2();
    return 0;
}